home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 8: LINUX Games / Linux Cubed Series 8 - LINUX Games.iso / games / video / linux-ab.1 / linux-abuse.1.1.0.tar / abuse-1.10 / lisp / deathmat.lsp < prev    next >
Lisp/Scheme  |  1995-10-23  |  4KB  |  126 lines

  1. ;; Copyright 1995 Crack dot Com,  All Rights reserved
  2. ;; See licensing information for more details on usage rights
  3.  
  4. (perm-space)
  5.  
  6. ;; this is a simple check to see if they player has an engine version
  7. ;; capable of playing the game.  All games should at least check for version 1.10
  8. ;; because all version before that are beta and have known bugs.
  9.  
  10. (if (< (+ (* (major_version) 100) (minor_version)) 110)    ; require at least version 1.10
  11.     (progn
  12.       (print "Your engine is out of date.  This game requires version 1.1")
  13.       (quit)))
  14.  
  15.  
  16. (setq load_warn nil)
  17. (if (not (load "lisp/common.lsp"))
  18.     (progn
  19.       (print "Please make sure you unzipped the game with the -d option")
  20.       (print "so that all directories get created properly.")      
  21.       (print "example : pkunzip -d abusXXXX.zip")      
  22.       (quit)))
  23. (setq load_warn T)
  24.  
  25. (if (not (get_option "-net"))   ;;  are we connecting to a server?
  26.     (start_server))
  27.  
  28.  
  29. ;; this function is called at the end of every screen update
  30. ;; for death match we use this to display a list of players in the
  31. ;; game and the kills for each player
  32.  
  33. (defun display_player (player text_y)
  34.   (if player
  35.       (with_object player    
  36.     (put_string (get_main_font) (+ (view_x1) 4) text_y 
  37.             (concatenate 'string (digstr (kills) 4) " '" (player_name) 
  38.                              (if (local_player) 
  39.                              "' <<"
  40.                                "'"))
  41.             (aref player_text_color (player_number)))
  42.     (display_player (next_focus player) (+ text_y (font_height (get_main_font)))))))
  43.  
  44.  
  45. (defun post_render ()
  46.   (if (not (edit_mode))      ; don't try this in edit mode
  47.       (display_player (first_focus) (with_object (first_focus) (view_y1)))))
  48.  
  49. (load "lisp/chat.lsp")
  50.  
  51. (setq keep_backup T)                  ;; determines if Save
  52. (setq load_warn nil)
  53. (load "lastsave.lsp")
  54. (load "lisp/english.lsp")             ;; load language specific stuff
  55. (local_load "gamma.lsp")              ;; load gamma correction values if they have been saved
  56.  
  57. (if (not (load "hardness.lsp"))       ;; load hardness, if no file set to hard
  58.     (setf difficulty        'hard))
  59. (setq load_warn T)
  60.  
  61. ; *********** Defaults **************************
  62. (setf sfx_directory     "sfx/")
  63. (load_big_font     "art/screen11.spe" "screen11")
  64. (load_small_font   "art/letters.spe" "small_font")
  65. (load_console_font "art/consfnt.spe" "fnt5x7")
  66. (load_color_filter "art/back/backgrnd.spe")
  67. (load_palette      "art/back/backgrnd.spe")
  68. (setq normal_tint (def_tint "art/back/backgrnd.spe"))
  69.  
  70. (load_tiles "art/fore/foregrnd.spe"
  71.         "art/fore/techno.spe"
  72.         "art/fore/techno2.spe"
  73.         "art/fore/techno3.spe"
  74.         "art/fore/techno4.spe"
  75.         "art/fore/cave.spe"
  76.  
  77.         "art/back/intro.spe"
  78.         "art/back/city.spe"
  79.         "art/back/tech.spe"
  80.         "art/back/cave.spe"
  81.         "art/back/backgrnd.spe")
  82.  
  83. (setq load_warn nil)
  84. (load "register/tiles.lsp")       ;; load up registered artwork if it's there
  85. (setq load_warn T)
  86.  
  87. (setf title_screen      '("art/title.spe" . "title_screen"))
  88. (setf logo              '("art/title.spe" . "cdc_logo"))
  89. (setq help_screens '("art/help.spe" "sell1" "sell2" "sell4"))
  90.  
  91.  
  92. (load "lisp/options.lsp")     
  93.  
  94. (load "lisp/input.lsp")
  95. (load "lisp/userfuns.lsp")
  96. (load "lisp/sfx.lsp")
  97. (load "lisp/gates.lsp")
  98. (load "lisp/duong.lsp")
  99. (load "lisp/ant.lsp")
  100. (load "lisp/people.lsp")
  101. (load "lisp/weapons.lsp")
  102. (load "lisp/explo.lsp")
  103. (load "lisp/platform.lsp")
  104. (load "lisp/guns.lsp")
  105. (load "lisp/jugger.lsp")
  106. (load "lisp/flyer.lsp")
  107. (load "lisp/teleport.lsp")
  108. (load "lisp/general.lsp")
  109. (load "lisp/powerup.lsp")
  110. (load "lisp/doors.lsp")
  111. (load "lisp/light.lsp")
  112. (load "lisp/ladder.lsp")
  113. (load "lisp/switch.lsp")
  114.  
  115. (if (not (get_option "-f"))
  116.     (set_first_level "levels/netshar1.spe"))
  117.  
  118.  
  119. (setq bad_guy_list (list DARNEL ANT_ROOF TRACK_GUN SPRAY_GUN JUGGER ROB1 WHO ROCKET FLYER GREEN_FLYER BOSS_ANT))
  120.  
  121. (gc)              ;; garbage collection perm space
  122. (tmp-space)       ;; execute game code in tmp space which is not GC'ed
  123. (create_players DARNEL)
  124.  
  125.  
  126.